﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>登录</title>
    <link rel="~/Hui/shortcut icon" href="favicon.ico">
    <link href="~/Hui/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="~/Hui/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="~/Hui/css/animate.css" rel="stylesheet">
    <link href="~/Hui/css/style.css?v=4.1.0" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <script>if(window.top !== window.self){ window.top.location = window.location;}</script>
</head>
<body class="gray-bg">
    <div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div>
                <h1 class="logo-name">H+</h1>
            </div>
            <h3>欢迎使用 H+</h3>
           @using (Ajax.BeginForm("login", "user", null, new AjaxOptions() { HttpMethod = "post", OnSuccess = "successLogin" }, new { id = "myform",@class= "m-t", @role= "form" }))
           {
            <div class="form-group">
                <input type="text" class="form-control" placeholder="用户名" name="UserName" required>
            </div>
                <div class="form-group">
                    <input type="password" class="form-control" placeholder="密码" name="Pwd" required>
                </div>
                <input type="submit" class="btn btn-primary block full-width m-b" value="登 录">

                <p class="text-muted text-center">
                    <a href="login.html#"><small>忘记密码了？</small></a>
                </p>
           }
        </div>
    </div>
    <!-- 全局js -->
    <script src="~/Hui/js/jquery.min.js?v=2.1.4"></script>
    <script src="~/Hui/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="~/Hui/js/plugins/layer/layer.min.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <script type="text/javascript">
        function successLogin(data) {
            if (!data.isSuccess) {
                parent.layer.msg(data.msg);
            } else {

                    window.location.href = "/home/index";
            }
        }
    </script>
   
</body >
</html >
